package com.yuxi.Dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.yuxi.Entity.CommentRecordBrowse;
import com.yuxi.Entity.PowerRole;
import com.yuxi.Entity.PrisonRole;
import com.yuxi.Request.Page;

/**
 *角色权限操作接口
 * @author hunter
 * @version 1.0
 * 2016/07/18
 */


@Repository
public interface PowerRoleDao {
	/**
	 * 通过powerRoleId获取PowerRole
	 * @param 	powerRoleId
	 * @return PowerRole 
	 * */
	public PowerRole getPowerRole(Integer powerRoleId);
	/**
	 * 添加一个PowerRole  并返回添加的实体类
	 * @param 	powerRoleId
	 * @return PowerRole 
	 * */
	public PowerRole addPowerRole(PowerRole pRole);
	/**
	 * 删除一个PowerRole  并返回删除的实体类
	 * @param 	pRole PowerRole实体类
	 * @return PowerRole 
	 * */
	public void deletePowerRole(PowerRole pRole);
	/**
	 * 删除一个PowerRole  并返回删除的实体类
	 * @param 	pRole PowerRole实体类
	 * @return PowerRole 
	 * */
	public void deletePowerRoleByRoleId(Integer roleId);
	/**
	 * 修改一个PowerRole  并返回修改的实体类
	 * @param  pRole  PowerRole实体类
	 * @return PowerRole 
	 * */
	public void modifly(PowerRole pRole);
	/**
	 * 查询所有角色权限信息
	 * @param p
	 * @return
	 */
	public Page<PowerRole> getPowerRoleAll(Page p);
	/**
	 * 通过roleId获取PowerRole
	 * @param 	roleId
	 * @return PowerRole 
	 * */
	public List<PowerRole> getPowerByRoleId(Integer roleId);
	
	/**
	 * 通过用户ID获取用户的权限信息
	 * @param userId
	 * @return PrisonRole
	 */
	public PowerRole getUserRolePower(int userId);
}
